Skip to main content

Import

Usage

Return Type

The hook returns an object with the following properties:

Properties

isLoading

boolean A boolean indicating if the session request operation is in progress.

error

Error | null An error object if the last operation failed, otherwise null.

addExplicitSession

(params: ExplicitSessionParams, includeFeeOptionPermissions?: boolean) => Promise<void>
Function to create a new explicit session.

modifyExplicitSession

(explicitSession: ExplicitSession) => Promise<void>
Function to modify an existing explicit session.

getExplicitSessions

() => Promise<ExplicitSession[]> Function to get all explicit sessions for the connected wallet.

Notes

This hook provides functionality for managing explicit sessions in Sequence V3 wallet connections. Key features:
  • Create new explicit sessions with custom permissions and spending limits
  • Retrieve all existing explicit sessions for the connected wallet
  • Modify existing explicit sessions
  • Built-in error handling for common connection issues
  • Loading states for better user experience
  • Automatic session filtering to only show explicit sessions